﻿@using Db8
@model IEnumerable<Db8.Data.User>
@{
    ViewBag.Title = "Community";
}

<section class="content">
<div>@Html.Partial("_Navigation")</div>

<p class="validation-summary-errors">Coming Soon...</p>

<table>
    <tr>
        <th>Users</th>
        <th>Roles</th>
    </tr>
    @foreach (var item in Model) {
        <tr>
            <td style="width: 360px;">
                <div>
                    <img src="@item.Picture" width="36" height="36" style="float:left; margin-right: 10px" /><a href="@item.Link" target="_blank"><strong>@item.Name</strong></a><br />
                    <small style="font-size: smaller;">Last Seen: <span class="datetime">@item.LastActivityDt</span></small>
                </div>
            </td>
            <td>
                @if (item.IsContentAdministrator)
                {
                <span style="margin-right:10px;">
                <input disabled="disabled" type="checkbox" name="IsContentAdministrator" data-userid="@item.UserId" data-role="@Db8Roles.CONTENT_ADMINISTRATOR" id="chkca-@item.UserId" value="true" class="styled"  checked="checked" />
                <label for="chkca-@item.UserId" class="editor-field">Content Admin</label>
                </span>
                }
                @if (item.IsSystemAdministrator)
                { 
                <span style="margin-right:10px;">
                <input disabled="disabled" type="checkbox" name="IsSystemAdministrator" data-userid="@item.UserId" data-role="@Db8Roles.SYSTEM_ADMINISTRATOR" id="chksa-@item.UserId" value="true" class="styled" checked="checked" />
                <label for="chksa-@item.UserId" class="editor-field">System Admin</label>
                </span>
                }
            </td>
        </tr>
    }
</table>

</section>
